Geometric Information
QuickDraw GX lets you calculate specific geometric information about a shape, or about the contour of a shape. You can
Figure 4-10 illustrates the geometric information you can obtain about a shape.
- find the length of all of a shape's contours or of a particular contour of a shape
- locates the point that falls at a given distance along a particular contour of a shape
- calculates the area contained by the contours of a shape's geometry or by a particular contour of a shape's geometry
- find the center point of a shape or of a particular contour of a shape
- find the bounding rectangle of a shape
Figure 4-10 Geometric information available about a path shape
Notice in Figure 4-10 that, because the first point of the path shape is an off-curve control point, the length-to-point operation starts its calculation at an initial on-curve point, halfway between the original first and last points of the contour.
QuickDraw GX also allows you to set the bounding rectangle of a shape, and therefore move and scale the shape, as shown in Figure 4-11.
Figure 4-11 A path shape resized by changing its bounding rectangle
For programming examples of obtaining geometric information about shapes, see "Finding Geometric Information About a Shape" beginning on page 4-41.
For programming examples of setting the bounding rectangle of a shape, see "Setting a Shape's Bounding Rectangle" beginning on page 4-47.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help